<div id="panel-button" class="row">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-body text-right">
				<div class="col-sm-4 pull-left">
					{{Form::text('filter', null, array('id' => 'filter', 'class' => 'form-control', 'placeholder' => trans('form.filter')))}}
				</div>
				<!--{{Form::button(trans('form.create'), array('class' => 'btn btn-success', 'id' => 'create'))}}-->
			</div>
		</div>
	</div>
</div>

<div id="panel-button-fixed" class="row hidden">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-body text-right">
				<div class="col-sm-4 pull-left">
					{{Form::text('filter', null, array('id' => 'filter', 'class' => 'form-control', 'placeholder' => trans('form.filter')))}}
				</div>
				<!--{{Form::button(trans('form.create'), array('class' => 'btn btn-success', 'id' => 'create'))}}-->
			</div>
		</div>
	</div>
</div>

<div class="row">
	<div class="col-md-12">
		<div class="panel panel-default">
			<!--<header class="panel-heading">{{trans('customer.customer_list')}}</header>-->
			<div class="panel-body">
				<div class="table-responsive">
					<table class="table table-striped footable" data-filter="#filter" data-page-size="10" data-filter-minimum="1">
						<thead>
							<tr>
								<th>{{trans('customer.name')}}</th>
								<th>{{trans('customer.address')}}</th>
							</tr>
						</thead>
						<tbody>
							@foreach($customers as $row)
							<tr id="customer" data-id="{{$row->id}}">
								<td>{{HTML::link('admin/customer/edit/' . $row->id, $row->name)}}</td>
								<td>{{$row->address}}</td>
							</tr>
							@endforeach
						</tbody>
						<tfoot>
							<tr>
								<td colspan="3">
									<ul class="pagination pagination-sm"></ul>
								</td>
							</tr>
						</tfoot>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
	$("tr#customer").click(function(){
		var id = $(this).attr('data-id');
		var url = '{{URL::to("admin/order/customer")}}' + "/" + id;

		window.location = url;
	});

	$('.footable').footable();
});
</script>